package models

type Token struct {
	ID           int64  `gorm:"column:id" json:"-"`
	AccessToken  string `gorm:"column:access_token" json:"-"`
	RefreshToken string `gorm:"column:refresh_token" json:"-"`
	UserId       int64  `gorm:"column:user_id" json:"-"`
	TimeCreate   int64  `gorm:"column:time_create" json:"-"`
	TimeExpired  int64  `gorm:"column:time_expired" json:"-"`

	Identity *Identity `gorm:"foreignKey:user_id" json:"-"`
}

func (Token) TableName() string {
	return "token"
}
